Optimal. Leaf size=73 \[ \frac{(A b-a C) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{a} b^{3/2}}+\frac{(b B-a D) \log \left (a+b x^2\right )}{2 b^2}+\frac{C x}{b}+\frac{D x^2}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0650568, antiderivative size = 73, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {1810, 635, 205, 260} \[ \frac{(A b-a C) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{a} b^{3/2}}+\frac{(b B-a D) \log \left (a+b x^2\right )}{2 b^2}+\frac{C x}{b}+\frac{D x^2}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1810
Rule 635
Rule 205
Rule 260
Rubi steps
\begin{align*} \int \frac{A+B x+C x^2+D x^3}{a+b x^2} \, dx &=\int \left (\frac{C}{b}+\frac{D x}{b}+\frac{A b-a C+(b B-a D) x}{b \left (a+b x^2\right )}\right ) \, dx\\ &=\frac{C x}{b}+\frac{D x^2}{2 b}+\frac{\int \frac{A b-a C+(b B-a D) x}{a+b x^2} \, dx}{b}\\ &=\frac{C x}{b}+\frac{D x^2}{2 b}+\frac{(A b-a C) \int \frac{1}{a+b x^2} \, dx}{b}+\frac{(b B-a D) \int \frac{x}{a+b x^2} \, dx}{b}\\ &=\frac{C x}{b}+\frac{D x^2}{2 b}+\frac{(A b-a C) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{a} b^{3/2}}+\frac{(b B-a D) \log \left (a+b x^2\right )}{2 b^2}\\ \end{align*}
Mathematica [A] time = 0.0404422, size = 68, normalized size = 0.93 \[ \frac{\frac{2 \sqrt{b} (A b-a C) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{a}}+(b B-a D) \log \left (a+b x^2\right )+b x (2 C+D x)}{2 b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 83, normalized size = 1.1 \begin{align*}{\frac{D{x}^{2}}{2\,b}}+{\frac{Cx}{b}}+{\frac{\ln \left ( b{x}^{2}+a \right ) B}{2\,b}}-{\frac{\ln \left ( b{x}^{2}+a \right ) aD}{2\,{b}^{2}}}+{A\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{aC}{b}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.959732, size = 219, normalized size = 3. \begin{align*} \frac{C x}{b} + \frac{D x^{2}}{2 b} + \left (- \frac{- B b + D a}{2 b^{2}} - \frac{\sqrt{- a b^{5}} \left (- A b + C a\right )}{2 a b^{4}}\right ) \log{\left (x + \frac{B a b - D a^{2} - 2 a b^{2} \left (- \frac{- B b + D a}{2 b^{2}} - \frac{\sqrt{- a b^{5}} \left (- A b + C a\right )}{2 a b^{4}}\right )}{- A b^{2} + C a b} \right )} + \left (- \frac{- B b + D a}{2 b^{2}} + \frac{\sqrt{- a b^{5}} \left (- A b + C a\right )}{2 a b^{4}}\right ) \log{\left (x + \frac{B a b - D a^{2} - 2 a b^{2} \left (- \frac{- B b + D a}{2 b^{2}} + \frac{\sqrt{- a b^{5}} \left (- A b + C a\right )}{2 a b^{4}}\right )}{- A b^{2} + C a b} \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.19558, size = 89, normalized size = 1.22 \begin{align*} -\frac{{\left (C a - A b\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b} b} - \frac{{\left (D a - B b\right )} \log \left (b x^{2} + a\right )}{2 \, b^{2}} + \frac{D b x^{2} + 2 \, C b x}{2 \, b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]